import config from "@/config";
import http from "@/utils/request";

export default {
	token: {
		url: `${config.API_URL}/sign/password`,
		name: "登录获取TOKEN",
		post: async function (data = {}) {
			return await http.post(this.url, data);
		},
	},
	captcha: {
		url: `${config.API_URL}/sign/captcha`,
		name: "获取登录的验证码",
		get: async function () {
			return await http.get(this.url + "?captchaId=adminui");
		},
	},
	slideCaptchaCheck: {
		url: `${config.API_URL}/sign/captcha/check/`,
		name: "获取登录的验证码",
		post: async function (id, data) {
			return await http.post(this.url + id, data);
		},
	},
	captchaCheck: {
		url: `${config.API_URL}/sign/captcha/check/`,
		name: "获取登录的验证码",
		post: async function (id, data) {
			return await http.post(this.url + "id=" + id + "&code=" + data);
		},
	},
};
